Categories
Mastering Development

Flutter: Get json fixed data and ordered-by alphabetically

I get data from a json API. And want to show my app which data’s category is equal to 1. I could have done this by call category-1 url link but I need all data by link at a time and then divided into many parts. I am using if(mydata[index].category==1)then return. But I think it’s […]

Categories
Mastering Development

React router works only with /#/ within the URL, otherwise error 404 on a Ubuntu server

My app is deployed (npm run build) on a Ubuntu server. I’m using a Router in my App and when clicking on a link (i.e contact-us), it’s working – user is redirected to the page. But if I’m trying to access to the contact-us page directly (http://my_ip/contact-us), I get a 404 response. Note: If I […]

Categories
Mastering Development

Terminal failed to compile using react routers (wrong syntax probably )

The Terminal failed to compile. because create is not defined, I still learn using routers, it seems that the syntax or the locations wrong, I tried to understand how should I write it right in this project but there are too many details in my code already. The goal is to show one page with […]

Categories
Cryptocurrency Ethereum Mastering Development

Adding a web2 Landing Page (homepage) to a drizzle-react based web3 app (dapp)

I’m trying to create an ethereum dapp using create-react-app & drizzle Hooks. My dapp requires the landing page (homepage) to not ask for metamask linking or drizzleProvider injection, and to keep it more of information page. subsequently from Homepage, it needs to be routed to one of the three pages – memberPage, inviteReceivedPage, inviteNotReceivedPage – […]

Categories
Mastering Development

React Router DOM Load component only if needed

I have this fully functional and very basic code: import React from "react"; import ReactDOM from "react-dom"; import {BrowserRouter, Route, Switch} from "react-router-dom"; import Home from "./App/home.jsx"; import About from "./App/about.jsx"; ReactDOM.render( <BrowserRouter> <Switch> <Route exact path="/" component={Home}></Route> <Route path="/About" component={About}></Route> </Switch> </BrowserRouter>, document.getElementById("main") ); I realise that no matter what, Home and About components […]

Categories
Mastering Development

React error boundary gets invoked but does not render

Please see this codesandbox for reproduction I have created an error boundary that redirects the app to the /error route. However, sometimes when an error is triggered (in the case of the codesandbox by clicking on the link for the bug page), my error boundary is invoked and the browser is redirected to the /error […]

Categories
Linux Mastering Development Ubuntu

Problems with SSH, I also can’t ping any websites or local devices on the network

I have an ethernet cable connected to the router and I set up the ubuntu server with the IP 192.168.1.123 using the installation of Ubuntu Server 20.04 Manual IPv4. I used Set static IP on Ubuntu Core and tsteiner answer. This finally worked for installing apt-get commands such as upgrade and update. I am not […]

Categories
Linux Mastering Development Ubuntu

Problems with SSH, I also can’t ping any websites or local devices on the network

I have an ethernet cable connected to the router and I set up the ubuntu server with the IP 192.168.1.123 using the installation of Ubuntu Server 20.04 Manual IPv4. I used Set static IP on Ubuntu Core and tsteiner answer. This finally worked for installing apt-get commands such as upgrade and update. I am not […]

Categories
Mastering Development

Typescript Routing Error – No overload matches this call

I am trying to redirect to a sign up page when a button is clicked, however, I am receiving a ‘no overload matches this call error’. I tried to Google the error however it seems quite broad and I am new to Typescript so unsure how to fix it. How should I fix the error […]

Categories
Mastering Development

Dynamic buttons with dynamic v-if

I’m generating some menu buttons dynamically (not sure if that’s best practice) script items: [ { title: ‘Dashboard’, icon: ‘mdi-view-dashboard’, route: ‘/’ }, { title: ‘Register’, icon: ‘mdi-image’, route: ‘/register’ }, { title: ‘Login’, icon: ‘mdi-help-box’, route: ‘/login’ }, ], html <v-list-item v-for=”(item, i) in items” :key=”i” link :to=”{path: item.route}”> But what I want to […]