Skip to content

Commit

Permalink
(#79) Remove comments, logs, unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
espen42 committed Oct 8, 2021
1 parent db32a5c commit 72939f7
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/components/blocks/header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {FunctionComponent, useEffect, useState} from "react"
import React, {FunctionComponent} from "react"
import { getPublicAssetUrl } from '../../enonic-connection-config';
import Link from "next/link";

Expand All @@ -9,7 +9,6 @@ type HeaderProps = {

const Header: FunctionComponent<HeaderProps> = ({ siteTitle, requestIsFromXp }: HeaderProps) => {
const logoUrl = getPublicAssetUrl('images/xp-shield.svg', requestIsFromXp);
console.log("Header:", { siteTitle, requestIsFromXp, logoUrl });

return (
<header
Expand Down
1 change: 0 additions & 1 deletion src/components/errors/500.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// pages/500.js
export default function Custom500({message}) {
return <>
<h1>500 - Server-side error occurred</h1>
Expand Down
1 change: 0 additions & 1 deletion src/components/pagetypes/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import React from "react"
import {DisplayableList} from "../../selectors/propsProcessors/processFolder";

const ListPage = ( {displayName, children}: DisplayableList) => {
// console.log("\n\nChildren props:", children);
return (
<>
<h1>{displayName}</h1>
Expand Down
2 changes: 0 additions & 2 deletions src/components/pagetypes/Movie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import {DisplayableMovie} from "../../selectors/propsProcessors/processMovie";


const MoviePage = (movie: DisplayableMovie) => {
// console.log("\n\nMovie props:", movie);

return (
<>
<div>
Expand Down
1 change: 0 additions & 1 deletion src/pages/[[...contentPath]].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type Context = {

export const getServerSideProps = async (context: Context) => {
const pageProps = await fetchContent(context.params.contentPath, !!context.query.__fromXp__);
console.log("getServerSideProps:", pageProps);
return {
props: {
...pageProps
Expand Down
1 change: 0 additions & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Head from "next/head";


function MyApp({Component, pageProps}: AppProps) {
console.log("MyApp:", pageProps);
return (
<>
{
Expand Down
3 changes: 1 addition & 2 deletions src/selectors/propsProcessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ export type PropsProcessorSelector = {
[fullContentType: string]: PropsProcessorFunc
};


export const propsProcessorSelector: PropsProcessorSelector = {
[`${appKey}:person`]: processPersonProps,

[`${appKey}:movie`]: processMovieProps,

'base:folder': processFolderProps,
};
2 changes: 0 additions & 2 deletions src/selectors/propsProcessors/processMovie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ const getCast = (cast: CastItem | CastItem[] | undefined, requestIsFromXp: boole


export const processMovieProps = (movie:Movie, requestIsFromXp: boolean): DisplayableMovie => {
console.log("Processing movie props:", movie);

const movieData = movie.data || {};

return {
Expand Down

0 comments on commit 72939f7

Please sign in to comment.