Sorry to put you on the spot Benedikt and Kirill Rogovoy Since you like coding I would love to hear your opinion on this

writen by WBE Office
As I understand it your page/file has to be a react component (export a react component)

writen by Benedikt
I think I figured it out. This does not work
import type { HeadFC } from 'gatsby'
import Title from './title'
export const getImagePath = (path: string, website:string) => {
if(path.includes('//')) {
return path;
}
return website + path;
}```
*But this does*
```import * as React from 'react'
import type { HeadFC } from 'gatsby'
import Title from './title'
const getImagePath = (path: string, website:string) => {
if(path.includes('//')) {
return path;
}
return website + path;
}
export default getImagePath```
What does the default mean actually?

writen by Tiago Ferreira
Exactly that’s what the error meant. Default is just the default export (you can do differently named exports for modules)

writen by Benedikt
<https//developer.mozilla.org/en-US/docs/web/javascript/reference/statements/export> explains it better than I could

writen by Benedikt
A module can have many named exports (e.g. export function foo …) and, optionally, a default export (export default …)
Many frameworks like Gatsby or Next expect a page file to have a default export with the page component.

writen by Kirill Rogovoy