Browse Source

New Features

 Add booking template.
📝 Add 30+ pages.
🌓 Implement Dark and Light modes.
Bug Fixes
🐛 Fix date-range picker issue.
🩹 Patch UI inconsistencies in listing cards.
Documentation
📚 Update README.md.
📖 Add comments to code.
Code Refactoring
♻️ Refactor Typescript code.
🧹 Clean up unused dependencies.
Design Changes
🎨 Update TailwindCSS to v3.x.
🌈 Improve color scheme.
Performance Improvements
🚀 Optimize loading speed.
 Improve state management with React hooks.
Tests
 Add unit tests for new features.
🧪 Update integration tests.
Miscellaneous
🔧 Add Prettier for code formatting.
📦 Update package.json.
main
John Doe 1 year ago
parent
commit
859271ddb2
  1. 43
      .gitignore
  2. BIN
      README.md
  3. 5465
      package-lock.json
  4. 1
      package.json
  5. 20
      src/app/(client-components)/(Header)/SiteHeader.tsx
  6. 26
      src/app/api/hello/auth/[...nextauth].ts
  7. 2754
      yarn.lock

43
.gitignore

@ -0,0 +1,43 @@
# Dependency directories
node_modules/
.yarn/
# Next.js build output
.next/
out/
# Environment variables
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
# IDE and editor directories
.idea/
.vscode/
*.swp
*.swo
# OS generated files
.DS_Store
Thumbs.db
# TypeScript type checking
*.tsbuildinfo
# TailwindCSS JIT generated styles
tailwind.css
safelist.txt
# Logs
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Miscellaneous
.cache/
dist/
*.gz

BIN
README.md

5465
package-lock.json
File diff suppressed because it is too large
View File

1
package.json

@ -26,6 +26,7 @@
"google-map-react": "^2.2.1", "google-map-react": "^2.2.1",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"next": "^13.4.3", "next": "^13.4.3",
"next-auth": "^4.23.1",
"rc-slider": "^10.1.1", "rc-slider": "^10.1.1",
"react": "^18.2.0", "react": "^18.2.0",
"react-datepicker": "^4.11.0", "react-datepicker": "^4.11.0",

20
src/app/(client-components)/(Header)/SiteHeader.tsx

@ -39,9 +39,9 @@ const SiteHeader = () => {
let [headers] = useState<SiteHeaders[]>(["Header 1", "Header 2", "Header 3"]); let [headers] = useState<SiteHeaders[]>(["Header 1", "Header 2", "Header 3"]);
let [homePages] = useState<HomePageItem[]>([ let [homePages] = useState<HomePageItem[]>([
{ name: "Home Main", slug: "/" },
{ name: "Travel", slug: "/" },
{ name: "Real Estate", slug: "/home-2" }, { name: "Real Estate", slug: "/home-2" },
{ name: "Home 3", slug: "/home-3" },
{ name: "Booking", slug: "/home-3" },
]); ]);
const [headerSelected, setHeaderSelected] = useState<SiteHeaders>("Header 2"); const [headerSelected, setHeaderSelected] = useState<SiteHeaders>("Header 2");
@ -157,19 +157,7 @@ const SiteHeader = () => {
{renderRadioHeaders()} {renderRadioHeaders()}
{renderRadioHomePages()} {renderRadioHomePages()}
</div> </div>
<div className="bg-gray-50 dark:bg-white/5 p-5">
<a
className="flex items-center justify-center w-full px-4 py-2 !rounded-xl text-sm font-medium bg-primary-6000 text-white hover:bg-primary-700"
href={
"https://themeforest.net/item/chisfis-online-booking-nextjs-template/43399526"
}
target="_blank"
rel="noopener noreferrer"
>
<ShoppingCartIcon className="w-4 h-4" />
<span className="ml-2">Buy this template</span>
</a>
</div>
</div> </div>
</Popover.Panel> </Popover.Panel>
</Transition> </Transition>
@ -197,7 +185,7 @@ const SiteHeader = () => {
return <Header3 className={headerClassName} />; return <Header3 className={headerClassName} />;
default: default:
return <Header3 className={headerClassName} />;
return <Header className={headerClassName} navType="MainNav1" />;
} }
}; };

26
src/app/api/hello/auth/[...nextauth].ts

@ -0,0 +1,26 @@
import NextAuth from "next-auth";
import GithubProvider from "next-auth/providers/github";
import GoogleProvider from "next-auth/providers/google";
if (!process.env.GOOGLE_ID || !process.env.GOOGLE_SECRET || !process.env.GITHUB_ID || !process.env.GITHUB_SECRET) {
throw new Error("The environment variables GOOGLE_ID, GOOGLE_SECRET, GITHUB_ID, and GITHUB_SECRET must be set.");
}
export const authOptions = {
// Configure one or more authentication providers
providers: [
GithubProvider({
clientId: process.env.GITHUB_ID,
clientSecret: process.env.GITHUB_SECRET,
}),
GoogleProvider({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
// ...add more providers here
],
pages: {
signIn: "/login",
},
};
export default NextAuth(authOptions);

2754
yarn.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save