useAdropRewardedAd

rewarded ad hook์€ ๋ณด์ƒํ˜• ๊ด‘๊ณ ๋ฅผ ์š”์ฒญํ•˜๊ณ  ์‚ฌ์šฉ์ž์—๊ฒŒ ๋…ธ์ถœํ•ฉ๋‹ˆ๋‹ค.


const { 
    isClicked,
    isClosed,
    isEarnRewarded,
    isLoaded,
    isOpened,
    errorCode,
    reward,
    load,
    show,
    reset
} = useAdropRewardedAd(unitId: string)

๊ด‘๊ณ  ์œ ๋‹› ID๋ฅผ ํ•„์ˆ˜๋กœ ์ž…๋ ฅํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.


Returns

isClicked: boolean

๊ด‘๊ณ ๊ฐ€ ํด๋ฆญ ๋˜์—ˆ๋Š”์ง€ ํ™•์ธ(Determine)ํ•ฉ๋‹ˆ๋‹ค.

isClosed: boolean

๊ด‘๊ณ ๊ฐ€ ์‚ฌ๋ผ์กŒ๋Š”์ง€ ํ™•์ธ(Determine)ํ•ฉ๋‹ˆ๋‹ค.

isEarnRewarded: boolean

๋ณด์ƒํ˜• ๊ด‘๊ณ ๊ฐ€ ์–ธ์ œ ๋ฆฌ์›Œ๋“œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์•˜๋Š”์ง€ ํ™•์ธ(Determine)ํ•ฉ๋‹ˆ๋‹ค.

isLoaded: boolean

๊ด‘๊ณ ๊ฐ€ ์™„์ „ํžˆ ๋กœ๋“œ๋˜์—ˆ๋Š”์ง€ ํ™•์ธ(Determine)ํ•ฉ๋‹ˆ๋‹ค.

isOpened: boolean

๊ด‘๊ณ ๊ฐ€ ์™„์ „ํžˆ ๋ณด์—ฌ์กŒ๋Š”์ง€ ํ™•์ธ(Determine)ํ•ฉ๋‹ˆ๋‹ค.

errorCode: string?

๊ด‘๊ณ ๊ฐ€ ์ˆ˜์‹  ๋˜๋Š” ๋…ธ์ถœ์— ์‹คํŒจํ•œ ๊ฒฝ์šฐ์˜ AdropErrorCode์ž…๋‹ˆ๋‹ค.

reward: { type: number; amount: number }?

๋ณด์ƒํ˜• ๊ด‘๊ณ ๊ฐ€ ๋ฆฌ์›Œ๋“œ ๋ฉ”์‹œ์ง€๋ฅผ ๋ฐ›์•˜์„ ๋•Œ ๋ณด์ƒ ์œ ํ˜• ๋ฐ ๊ธˆ์•ก์ž…๋‹ˆ๋‹ค.

load: () -> void

๊ด‘๊ณ  ์œ ๋‹› ID๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Adrop์—์„œ ๊ด‘๊ณ ๋ฅผ ์š”์ฒญํ•ฉ๋‹ˆ๋‹ค.

show: () -> void

๊ด‘๊ณ  ์œ ๋‹› ID๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ Adrop์˜ ๊ด‘๊ณ ๋ฅผ ๋…ธ์ถœํ•ฉ๋‹ˆ๋‹ค.

show๊ฐ€ ํ˜ธ์ถœ๋˜๊ธฐ ์ „์— ์™„์ „ํžˆ ๋กœ๋“œ๋˜์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

reset: () -> void

์ƒˆ ๊ด‘๊ณ ๋ฅผ ์š”์ฒญํ•˜๊ธฐ ์œ„ํ•ด ์žฌ์„ค์ •ํ•˜๊ฑฐ๋‚˜ ๋ฉ”๋ชจ๋ฆฌ ํ•ด์ œ๋ฅผ ์œ„ํ•ด ๊ด‘๊ณ ๋ฅผ Destroyํ•ฉ๋‹ˆ๋‹ค.

Last updated