Skip to content
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: 2 additions & 2 deletions .github/workflows/build-deploy-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BS3APP_DFB63 }}'

- name: Deploy functions
run: firebase deploy --only functions --project bs3app-dfb63
run: firebase deploy --only functions --project bs3app-dfb63 --force
working-directory: ./bs3-functions
env:
PERPLEXITY_SONAR_API_KEY: ${{ secrets.PERPLEXITY_SONAR_API_KEY }}
PERPLEXITY_SONAR_API_KEY: dummy-api-key-change-me

- name: Deploy to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
Expand Down
2 changes: 1 addition & 1 deletion bs3/src/app/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import geolocatorReducer from './geolocatorSlice';

export const store = configureStore({
reducer: {
app: firestoreReducer,
firestore: firestoreReducer,
geolocation: geolocatorReducer,
},
});
Expand Down
4 changes: 2 additions & 2 deletions bs3/src/components/bottom-app-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ HideOnScroll.propTypes = {

// Define the types for the Redux state
interface AppState {
app: {
firestore: {
user: string;
};
geolocation: {
Expand All @@ -46,7 +46,7 @@ interface AppState {
}

export default function BottomAppBar(): JSX.Element {
const user = useSelector((state: AppState) => state.app.user);
const user = useSelector((state: AppState) => state.firestore.user);
const location = useSelector((state: AppState) => state.geolocation.location);

return (
Expand Down
2 changes: 1 addition & 1 deletion bs3/src/components/comments-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function CommentsSection({ postId }: CommentsSectionProps) {

const textAreaRef = useRef<HTMLTextAreaElement | null>(null);

const userId = useAppSelector(state => state.app.user);
const userId = useAppSelector(state => state.firestore.user);
const location = useAppSelector(state => state.geolocation.location);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion bs3/src/components/post-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default function BasicCard({ post, extended = false }: BasicCardProps) {
const [deleteWarningOpen, setDeleteWarningOpen] = useState<boolean>(false);
const [commentsCount, setCommentsCount] = useState<number>(0);

const userId = useAppSelector(state => state.app.user);
const userId = useAppSelector(state => state.firestore.user);
const location = useAppSelector(state => state.geolocation.location);

const [thisPost, setThisPost] = useState<ThisPostState>({
Expand Down
2 changes: 1 addition & 1 deletion bs3/src/pages/new-post-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function PostForm(): JSX.Element {
const navigate = useNavigate();
const dispatch = useAppDispatch();

const userId = useAppSelector((state) => state.app.user);
const userId = useAppSelector((state) => state.firestore.user);
const location = useAppSelector((state) => state.geolocation.location);

const [open, setOpen] = useState<boolean>(!location.local);
Expand Down
2 changes: 1 addition & 1 deletion bs3/src/pages/post-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const idLoader: LoaderFunction = ({ params }: LoaderArgs) => {
function Post(): JSX.Element {
const postId = useLoaderData() as string;
const post = useSelector((state: RootState) =>
state.app.posts.find((item) => item.id === postId)
state.firestore.posts.find((item) => item.id === postId)
);

if (!post) {
Expand Down
2 changes: 1 addition & 1 deletion bs3/src/pages/post-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface SnackBarState {
// PostListPage component
export default function PostListPage(): JSX.Element {
const dispatch = useAppDispatch();
const posts = useAppSelector((state: RootState) => state.app.posts);
const posts = useAppSelector((state: RootState) => state.firestore.posts);
const location = useLocation();
let snackBar: SnackBarState = { open: false, postId: null };

Expand Down