Style/Revamp #4
@@ -1,6 +1,6 @@
|
|||||||
import { lazy, Suspense, useEffect, useRef } from "react";
|
import { lazy, Suspense, useEffect, useRef } from "react";
|
||||||
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
|
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
|
||||||
import { ProtectedRoute, AutoRedirectRoute } from "./components/RouteGuards";
|
import { AutoRedirectRoute, ProtectedRoute } from "./components/RouteGuards";
|
||||||
import SplashScreen from "./components/SplashScreen";
|
import SplashScreen from "./components/SplashScreen";
|
||||||
import { ROUTES } from "./config/routes";
|
import { ROUTES } from "./config/routes";
|
||||||
import { useAuth } from "./hooks/useAuth";
|
import { useAuth } from "./hooks/useAuth";
|
||||||
@@ -34,11 +34,14 @@ export default function App() {
|
|||||||
<main className="relative min-h-screen min-w-screen flex items-center justify-center w-full bg-base-200 before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-50 before:pointer-events-none before:bg-[url('assets/noise.gif')]">
|
<main className="relative min-h-screen min-w-screen flex items-center justify-center w-full bg-base-200 before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-50 before:pointer-events-none before:bg-[url('assets/noise.gif')]">
|
||||||
<Suspense fallback={<SplashScreen />}>
|
<Suspense fallback={<SplashScreen />}>
|
||||||
<Routes>
|
<Routes>
|
||||||
<Route path={ROUTES.HOME} element={
|
<Route
|
||||||
|
path={ROUTES.HOME}
|
||||||
|
element={
|
||||||
<AutoRedirectRoute>
|
<AutoRedirectRoute>
|
||||||
<Home />
|
<Home />
|
||||||
</AutoRedirectRoute>
|
</AutoRedirectRoute>
|
||||||
} />
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path={ROUTES.ONBOARD}
|
path={ROUTES.ONBOARD}
|
||||||
|
|||||||
@@ -7,7 +7,11 @@ interface LogoProps {
|
|||||||
ul?: boolean;
|
ul?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Logo({ scale = 1, type = null, ul = false }: LogoProps) {
|
export default function Logo({
|
||||||
|
scale = 1,
|
||||||
|
type = null,
|
||||||
|
ul = false,
|
||||||
|
}: LogoProps) {
|
||||||
if (type === "inline") {
|
if (type === "inline") {
|
||||||
return (
|
return (
|
||||||
<span className={"text-accent font-display italic "}>
|
<span className={"text-accent font-display italic "}>
|
||||||
@@ -27,7 +31,12 @@ export default function Logo({ scale = 1, type = null, ul = false }: LogoProps)
|
|||||||
|
|
||||||
if (type === "logo") {
|
if (type === "logo") {
|
||||||
return (
|
return (
|
||||||
<img src="/android-chrome-512x512.png" alt="Pi. Ku. logo" className="mx-auto" width={scale * 100} />
|
<img
|
||||||
|
src="/android-chrome-512x512.png"
|
||||||
|
alt="Pi. Ku. logo"
|
||||||
|
className="mx-auto"
|
||||||
|
width={scale * 100}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { MemoryRouter, Route, Routes } from "react-router-dom";
|
|||||||
import { beforeEach, describe, expect, it } from "vitest";
|
import { beforeEach, describe, expect, it } from "vitest";
|
||||||
import { mockUser } from "../../test/fixtures/user.fixture";
|
import { mockUser } from "../../test/fixtures/user.fixture";
|
||||||
import { useAuthStore } from "../store/useAuthStore";
|
import { useAuthStore } from "../store/useAuthStore";
|
||||||
import { ProtectedRoute, AutoRedirectRoute } from "./RouteGuards";
|
import { AutoRedirectRoute, ProtectedRoute } from "./RouteGuards";
|
||||||
|
|
||||||
function renderGuard(ui: React.ReactNode, mountPath: "/protected" | "/public") {
|
function renderGuard(ui: React.ReactNode, mountPath: "/protected" | "/public") {
|
||||||
return render(
|
return render(
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ export default function Home() {
|
|||||||
ignite={ignite}
|
ignite={ignite}
|
||||||
recipient={recipient}
|
recipient={recipient}
|
||||||
date={formatDate(new Date().toISOString())}
|
date={formatDate(new Date().toISOString())}
|
||||||
onRevealComplete={() => { }}
|
onRevealComplete={() => {}}
|
||||||
isFlip={isEnvelopeFlipped}
|
isFlip={isEnvelopeFlipped}
|
||||||
openFlap={flapOpen}
|
openFlap={flapOpen}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user