codescandy / dashui-free-nextjs-admin-template

Dashui free nextjs admin dashboard template, built with latest react. Build your next project with DashUI React.

Home Page:https://dashui.codescandy.com/next-js-admin-dashboard-template.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API

GMJSilmaro opened this issue · comments

How does API Work here cause i can't do much and it wont load help ?

Hi, @GMJSilmaro

Please check reply to the same issue, it might be helpful.

#7

Let me know if it works :)

Hi, @sandipthemes how about middleware can you help me how to setup? im really new and i like your template is there anyway to setup it? i want to redirect non authenticated users to your (auth)/authentication/sign-in

If you want to redirect to specific page, you can use below code.

import { useRouter } from "next/navigation";
const Page = () => {
    const router = useRouter();
    return(<button onClick={() => router.push("/authentication/sign-in")}>Redirect</button>)
}

Please share, which middleware are you using for authentication process.