Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default seo values #231

Merged
merged 1 commit into from
Sep 27, 2024
Merged
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
4 changes: 1 addition & 3 deletions rair-front/src/hooks/useServerSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ const useServerSettings = () => {
link.rel = 'icon';
link.href = favicon
? favicon
: import.meta.env.VITE_TESTNET === 'true'
? HotdropsFavicon
: RairFavicon;
: RairFavicon;
document.getElementsByTagName('head')[0].appendChild(link);

return () => {
Expand Down
20 changes: 10 additions & 10 deletions rair-front/src/redux/seoSlice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LoadingDefaultFavicon } from '../images';

const hotdropsVar = import.meta.env.VITE_TESTNET;
// const hotdropsVar = import.meta.env.VITE_TESTNET;

import type { PayloadAction } from '@reduxjs/toolkit';
import { createSlice } from '@reduxjs/toolkit';
Expand Down Expand Up @@ -35,15 +35,15 @@ const initialStates: { [key: string]: SeoInformation } = {
faviconMobile: LoadingDefaultFavicon
},
rair: {
title: 'RAIR Technologies',
ogTitle: 'RAIR Technologies',
twitterTitle: 'RAIR Technologies',
title: import.meta.env.VITE_HTML_META_TITLE,
ogTitle: import.meta.env.VITE_HTML_META_TITLE,
twitterTitle: import.meta.env.VITE_HTML_META_TITLE,
contentName: 'author',
content: 'Digital Ownership Encryption',
content: import.meta.env.VITE_HTML_META_AUTHOR,
description:
'RAIR is a Blockchain-based digital rights management platform that uses NFTs to gate access to streaming content',
ogDescription: 'Encrypted, Streaming NFTs',
twitterDescription: 'Encrypted, Streaming NFTs',
import.meta.env.VITE_HTML_META_DESCRIPTION,
ogDescription: import.meta.env.VITE_HTML_META_DESCRIPTION,
twitterDescription: import.meta.env.VITE_HTML_META_DESCRIPTION,
image: `${
import.meta.env.VITE_IPFS_GATEWAY
}/QmNtfjBAPYEFxXiHmY5kcPh9huzkwquHBcn9ZJHGe7hfaW`,
Expand All @@ -53,15 +53,15 @@ const initialStates: { [key: string]: SeoInformation } = {
};

const initialState: SeoInformation = {
...initialStates[hotdropsVar ? 'hotdrops' : 'rair']
...initialStates['rair']
};

export const seoSlice = createSlice({
name: 'seo',
initialState,
reducers: {
setSEOInfo: (state, action: PayloadAction<SeoInformation | undefined>) => {
return action.payload || initialStates[hotdropsVar ? 'hotdrops' : 'rair'];
return action.payload || initialStates['rair'];
},
resetSEOInfo: (state) => {
Object.keys(state).forEach((key) => {
Expand Down