Skip to content

Commit

Permalink
move to header
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Dec 10, 2024
1 parent 486236c commit 189dc41
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ const config = {
async rewrites() {
return [
{
source: '/js/script.js',
source: '/pl/js/script.js',
destination: 'https://pl.ecency.com/js/script.js'
},
{
source: '/api/event', // Or '/api/event/' if you have `trailingSlash: true` in this config
source: '/pl/api/event',
destination: 'https://pl.ecency.com/api/event'
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { HiringConsoleLog } from "@/app/_components";
import { cookies } from "next/headers";
import { Theme } from "@/enums";
import { BannerManager } from "@/features/banners";
import React from "react";

export default async function RootLayout({ children }: { children: React.ReactNode }) {
const theme = (await cookies()).get("theme")?.value;

return (
<html lang="en">
<head><script defer data-domain="ecency.com" data-api="/pl/api/event" src="/pl/js/script.js"></script></head>
<body className={theme === Theme.night ? "dark" : ""}>
<BannerManager />
<HiringConsoleLog />
Expand Down
1 change: 0 additions & 1 deletion src/features/monitoring/tracker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export function Tracker() {
const isMounted = useMountedState();
return isMounted() ? (
<>
<script defer data-domain="ecency.com" src="/js/script.js"></script>
</>
) : (
<></>
Expand Down

0 comments on commit 189dc41

Please sign in to comment.