Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path');
const withReactSvg = require('next-react-svg');
const withPlugins = require('next-compose-plugins');
const { redirect } = require('next/dist/next-server/server/api-utils');
const withTM = require('next-transpile-modules')([
'react-material-ui-carousel',
]);
Expand Down
9 changes: 6 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useRef } from 'react';
import { useTheme } from 'next-themes';
import Router, { useRouter } from 'next/router';

import Head from 'next/head';
import Header from '../components/Header/Header';
Expand All @@ -18,6 +19,7 @@ import Features from '../components/ClvFeatures/CloverFeature';

declare var WOW;
const Home = () => {
const router = useRouter();
const { theme, setTheme } = useTheme();
const scrollRef = useRef(null);
const handleClickScroll = () => {
Expand All @@ -26,9 +28,10 @@ const Home = () => {
}
};
useEffect(() => {
setTimeout(_ => {
// new WOW({ animateClass: 'animated' }).init();
}, 1000);
const { asPath } = Router;
if (asPath !== '/') {
router.push(asPath);
}
}, []);

useEffect(() => {
Expand Down
10 changes: 3 additions & 7 deletions pages/sakura.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect, useRef } from 'react';
import { useTheme } from 'next-themes';
import Router from 'next/router';

import Head from 'next/head';
import Header from '../components/Header/Header';
Expand All @@ -17,19 +18,14 @@ import { Introduction } from '../components/Introduction/Introduction';
import Features from '../components/ClvFeatures/CloverFeature';

declare var WOW;
const Home = () => {
const Sakura = () => {
const { theme, setTheme } = useTheme();
const scrollRef = useRef(null);
const handleClickScroll = () => {
if (scrollRef.current) {
scrollRef.current.scrollIntoView({ behavior: 'smooth' });
}
};
useEffect(() => {
setTimeout(_ => {
// new WOW({ animateClass: 'animated' }).init();
}, 1000);
}, []);

useEffect(() => {
setTheme('dark');
Expand Down Expand Up @@ -68,4 +64,4 @@ const Home = () => {
);
};

export default Home;
export default Sakura;