Skip to content

Commit

Permalink
build(migration): react to next
Browse files Browse the repository at this point in the history
  • Loading branch information
JW-Rami committed Aug 1, 2024
1 parent ad54b38 commit 3640e97
Show file tree
Hide file tree
Showing 17 changed files with 440 additions and 121 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,9 @@ yarn-debug.log*
yarn-error.log*


src/firebaseConfig.js
src/firebaseConfig.js

# Next
.next
next-env.d.ts
dist
7 changes: 7 additions & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export', // Outputs a Single-Page Application (SPA).
distDir: './dist', // Changes the build output directory to `./dist/`.
}

export default nextConfig
277 changes: 277 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"firebase": "^9.15.0",
"framer-motion": "^7.8.0",
"gsap": "^3.11.3",
"next": "^14.2.5",
"react": "^18.2.0",
"react-calendly": "^4.3.0",
"react-device-detect": "^2.2.3",
Expand All @@ -29,8 +30,9 @@
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"dev": "next dev",
"build": "next build",
"start": "next start",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Home from "./page/Home/Home";
import Services from "./page/Services/Services";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { useState } from "react";
import Navbar from "./components/Navbar/Navbar";
import Navbar from "./components/Navbar/Navbar.tsx";
import MentionsLegales from "./components/MentionsLegales/MentionsLegales";
import BitcoinPrice from "./page/BitcoinPrice/BitcoinPrice";
function App() {
Expand Down
10 changes: 10 additions & 0 deletions src/app/[[...slug]]/client.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use client'

import React from 'react'
import dynamic from 'next/dynamic'

const App = dynamic(() => import('../../App'), { ssr: false })

export function ClientOnly() {
return <App />
}
Loading

0 comments on commit 3640e97

Please sign in to comment.